package model

import (
	"gorm.io/gorm"
)

type SysButton struct {
	gorm.Model
	Name             string 		`json:"name" gorm:"name:英文名"`
	Cname            string		    `json:"cname" gorm:"cname:别名"`
	ButtonGroup      string 		`json:"buttonGroup" gorm:"buttonGroup:button组"`
	Apis             []SysApi       `json:"apis" gorm:"foreignKey:ButtonRefer;AssociationForeignKey:ButtonRefer" `
	SysAuthoritys    []SysAuthority `json:"authoritys" gorm:"many2many:sys_authority_buttons;"`
	MenuId           int    		`json:"menuId" form:"menuId" gorm:"not null;column:menuId"`
	MenuButtonRefer  SysBaseMenu    `json:"menu" gorm:"comment:关联的标记;foreignKey:MenuId"`

}
